package 作业3.test3;

class Rectangle extends Shape {
    private double x,y;
    Rectangle(){}
    Rectangle(double x,double y){
        this.x=x;
        this.y=y;
    }
    public double getX(){
        return x;
    }
    public double getY(){
        return y;
    }
    public void showArea(){
        area=getX()*getY();
        System.out.println(area);
    }
}
